package com.car.account.util.validatorUtil;

/**
 * 判断车牌号格式
 */
public class CarIdValidator {

    public static boolean isValidLicensePlate(String licensePlate) {
        // 中国车牌号正则表达式，匹配格式如“沪A12345”或“京A1234”
        String regex = "^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4,5}$";
        return licensePlate.matches(regex);
    }

}
